package cn.briarbear.myblog.service;

import cn.briarbear.myblog.entity.dto.AdminUserPwdModifyForm;
import cn.briarbear.myblog.entity.dto.IdListForm;
import cn.briarbear.myblog.entity.dto.UserLoginForm;
import cn.briarbear.myblog.entity.table.Admin;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface IAdminService {


    /**
     * 管理员用户登录验证
     */
    Admin adminLoginCheck(UserLoginForm userLoginForm);

    /**
     * 将管理员用户加入到session中来
     */
    void joinSession(HttpServletRequest request, Admin admin);

    /**
     * 注销登录
     */
    void destroySession(HttpServletRequest request);

    /**
     * 后台管理员修改密码
     */
    String modifyUserPwd(AdminUserPwdModifyForm form, HttpServletRequest request);

    /**
     * 获取后台用户列表
     * @return 后台用户 json
     */
    List<Admin> getAdminUsers();

    void deleteAdminUser(IdListForm form);

}
